import http from '@/common/http';
export * from './upload';

const API_URL = import.meta.env.VITE_APP_APIURL;
export const FILE_DOWNLOAD_URL = API_URL + '/file/download/';
export function fetchGetFileList(params = {}) {
  return http.post('/file', params);
}

export function fetchRecoverDeleteFile(fileHash) {
  return http.get('/file/recover/' + fileHash);
}

export function fetchDownloadCreate(fileHash) {
  return http.get('/file/download/create/' + fileHash);
}

export function fetchDownload(taskId) {
  return http.get('/file/download/' + taskId);
}

export function fetchDeleteFile(fileId) {
  return http.get('/file/delete/' + fileId);
}

export function fetchDeleteBatchFile(params) {
  return http.post('/file/delete/batch', params);
}
